﻿//Portions Copyright (C) 2011 Randall Shattuck
//Portions Copyright (C) 2007-2010 Owners of libeveapi 
//    (http://libeveapi.googlecode.com)
//
//EveDashboard.Api was forked from libeveapi 1.1.3
//
//This program is free software; you can redistribute it and/or modify it under
//the terms of the GNU General Public License as published by the Free Software 
//Foundation; either version 2 of the License, or (at your option) any later 
//version.
//
//This program is distributed in the hope that it will be useful, but WITHOUT 
//ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
//FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
//details. You should have received a copy of the GNU General Public License 
//along with this program; if not, write to the Free Software Foundation, Inc.,
//59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//-----------------------------------------------------------------------------

using System;

namespace EveDashboard.Api
{
    /// <summary>
    /// Returns Mailing Lists for character.
    /// http://wiki.eve-id.net/APIv2_Char_mailinglists_XML
    /// </summary>
    public class MailList : ApiResponse
    {
        /// <summary>
        /// API Version Compatibility
        /// </summary>
		public const string API_VERSION = "0";
        private MailListItem[] mailListItems = new MailListItem[0];

        /// <summary>
        /// Array of Mailing Lists
        /// </summary>
        public MailListItem[] MailListItems
        {
            get { return mailListItems; }
            set { mailListItems = value; }
        }

        /// <summary>
        /// Mailing List Entry
        /// </summary>
        public class MailListItem
        {
            /// <summary>
            /// XmlResponse Columns List
            /// </summary>
			public static string Columns = "listID,displayName";
            /// <summary>
            /// Column Key or Unique Identifier for the object
            /// </summary>
			public static string Key = "listID";
			
            /// <summary>
            /// Full constructor
            /// </summary>
			public MailListItem(int listID, string displayName)
			{
				this.listID = listID;
				this.displayName = displayName;
			}
            private int listID;
            private string displayName;

            /// <summary>
            /// ID of the Mailing List
            /// </summary>
            public int ListID
            {
                get { return listID; }
                set { listID = value; }
            }

            /// <summary>
            /// Name of the Mailing List
            /// </summary>
            public string DisplayName
            {
                get { return displayName; }
                set { displayName = value; }
            }
        }
    }
}
